﻿
@model PessMvc.Models.ArchiveReviewFeedbackModel

@{
    ViewBag.Title = "ReviewFeedback";
}

<h2 style="width:400px;">Review Proposal Feedback</h2>
<div id="operate">
    @Html.ActionLink("Back to My Proposals", "Proposals")
</div>

<fieldset class="show">
    <legend></legend>

    <div class="displayHead" style="padding-right:5px;">
        @Html.DisplayFor(model => model.ProposalID): @Html.DisplayFor(model => model.ProposalTitle)
    </div>
    <p></p>
    <p><strong>Final Review result:</strong> @Model.Status</p>
    <p><strong>Accepte as Format:</strong> @Model.AcceptedFormat</p>
<p></p>
    <div class="ReviewBox">
        <div class="ReviewHeader">
            Chair's Feedback
        </div>
        <div class="ReviewBody" style="">
            @if(!string.IsNullOrEmpty(Model.ChairProposalFeedback))
            {
                 @MvcHtmlString.Create(@Model.ChairProposalFeedback)
            }
            else
            {
                <span>None</span>
            }
        </div>
    </div>

    @if(Model.Feedbacks.Count>0)
    {
        
        int x=1;
        foreach (var rf in Model.Feedbacks)
        {
            <div class="ReviewBox">
                <div class="ReviewHeader">Review #@x
                    @if ((int)rf.Acceptance ==1)
                    {
                        <img src="@Url.Content("~/images/green20.png")" alt="Accepted" style="vertical-align:text-top;margin-left:30px;" title="Accepted" />;
                    }
                    else
                    {
                        <img src="@Url.Content("~/images/red20.png")" alt="Rejected" style="vertical-align:text-top;margin-left:30px;" title="Rejected" />;
                    }
                </div>
                <div class="ReviewBody" style="">
                    @foreach (var s in rf.Scores)
                    {
                        <div class="display-label-rules">
                             @s.Key
                        </div>
                        <div class="display-field-rules">
                            @s.Value
                        </div>
                    }
                    <div class="display-label-rules" >
                        Comment
                    </div>
                    <div class="display-field-rules">
                        @MvcHtmlString.Create(@rf.Comment)                        
                    </div>
                    <div class="display-label-rules" >
                        Status
                    </div>
                    <div class="display-field-rules">
                        @rf.Acceptance
                    </div>
                </div>
            </div>
            x++;
        }
    }
    else
    {
        <h3>There is no review record available for this proposal!</h3>
    }
</fieldset>
